package com.googlecode.hypersphere.ws2ejb3.xml;

import org.dom4j.Document;

public class XPathQuery implements Query {
	
	private String query;

	public String getQuery() {
		return query;
	}
	public void setQuery(String query) {
		this.query = query;	
	}
	public String valueOf(Document doc) {
		String returnString = doc.valueOf(getQuery());
		if (returnString.equals("") || returnString == null)
			throw new IllegalArgumentException("Illegal query: " + query + " - returned \"\"");
		return doc.valueOf(getQuery());
	}

}
